package com.chaodev.base.config;

/**
 * vcbase
 *
 * @author 95634
 * @描述
 * @date 2023/3/6 9:50
 **/
//@Configuration
public class DynamicDataSourceConfig {
////    @Bean(name="base_db")
////    @ConfigurationProperties("spring.datasource.base")
//    public DataSource dataSource1(){
//        return DataSourceBuilder.create().build();
//    }
//
//    @Bean(name ="oracle_db")
//    @ConfigurationProperties("spring.datasource.datadb")
//    public DataSource dataSource2(){
//        return DataSourceBuilder.create().build();
//    }
//
//    @Bean(name="dynamicDataSource")
//    @Primary
//    public DynamicDataSource dataSource() {
//        Map<Object, Object> targetDataSources = new HashMap<>(5);
//        targetDataSources.put(DataSourceTypeEnum.BASE_DB.getName(), dataSource1());
//        targetDataSources.put(DataSourceTypeEnum.ORACLE_DB.getName(), dataSource2());
//        return new DynamicDataSource(dataSource1(), targetDataSources);
//    }
}
